<!--上传文件-->
<link rel="stylesheet" href="__STATIC__/admin/css/edit_common.css">

<link rel="stylesheet"type="text/css"href="__STATIC__/admin/uploadify/uploadify.css" />

<style>
    .node_span{
        position: absolute;
        color: red;
        text-align: center;
        width: 100%;
        font-size: 30px;
        opacity: 0.3;
        line-height: 100px;
    }
</style>

<div id="commodity_details">
    <h1 style="margin-top: 0px!important;">
        <img src="__STATIC__/admin/img/ico.png">
        产品图片
    </h1>
    </h1>
</div>

<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <form class="form-horizontal" role="form" method="post" url="{:url()}" id="edit_form">
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"> 位置 </label>
                    <div class="col-sm-9">
                        <select name="id">
                            {foreach name="list" item="ls"}
                            <option value="{$ls['id']}">{$ls['note']}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"> 图片 </label>
                    <div class="col-sm-9">
                        <input id="file_upload"  type="file" multiple="true" >
                        <img style="display: none" id="upload_org_code_img" src="{$config['config_image']}" width="150" height="150">
                        <input id="file_upload_image" name="config_value" type="hidden" multiple="true" value="{$config['config_image']}">
                    </div>
                </div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="button" id="li1_btn">
                            <i class="icon-ok bigger-110"></i>
                            保存
                        </button>
                    </div>
                </div>
            </form>
        </div><!-- /.col -->


        <link rel="stylesheet" type="text/css" href="__CSS__/product.css"/>

        <div class="section">
            <div class="container">
                <div class="bg1" style="background-image: url({$list[6]['config_value']});">
                    <div class="col-md-4" >
                        <span class="node_span">产品图片1</span>
                        <img src="{$list[0]['config_value']}" alt="doctor" title="doctor" class="imgclass"/>
                    </div>
                    <div class="col-md-4">
                        <span class="node_span">产品-中心图1</span>
                    </div>
                    <div class="col-md-4 ">
                        <span class="node_span">产品图片2</span>
                        <img src="{$list[1]['config_value']}" alt="doctor" title="doctor" class="imgclass"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="section">
            <div class="container">
                <div class="bg2" style="background-image: url({$list[7]['config_value']});">
                    <div class="col-md-4 " >
                        <span class="node_span">产品图片3</span>
                        <img src="{$list[2]['config_value']}" alt="doctor" title="doctor" class="imgclass"/>
                    </div>
                    <div class="col-md-4">
                        <span class="node_span">产品-中心图2</span>
                    </div>
                    <div class="col-md-4 ">
                        <span class="node_span">产品图片4</span>
                        <img src="{$list[3]['config_value']}" alt="doctor" title="doctor" class="imgclass"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="section">
            <div class="container">
                <div class="bg3" style="background-image: url({$list[8]['config_value']});">
                    <div class="col-md-4 ">
                        <span class="node_span">产品图片5</span>
                        <img src="{$list[4]['config_value']}" alt="doctor" title="doctor"  class="imgclass"/>
                    </div>
                    <div class="col-md-4">
                        <span class="node_span">产品-中心图3</span>
                    </div>
                    <div class="col-md-4 ">
                        <span class="node_span">产品图片6</span>
                        <img src="{$list[5]['config_value']}" alt="doctor" title="doctor"  class="imgclass"/>
                    </div>
                </div>
            </div>
        </div>
    </div><!-- /.row -->


</div><!-- /.page-content -->

{load href="__STATIC__/admin/js/image.js" /}
<script>
    $(".cp").addClass("active open");
    $(".cp .cptp").addClass("active");

    $('#li1_btn').click(function(){
        $.ajax({
            type: 'POST',
            url: "{:url('index/saveConfig')}",
            data: $('#edit_form').serialize(),
            dataType: "json",
            beforeSend: function() {
                $('#li1_btn').attr('disabled','true');
                $('#li1_btn').attr('value','上传中...');
            },
            success: function(data) {
                alert(data.message);
                if(0==data.status){
                    window.location.reload()
                }else{
                    $('#li1_btn').removeAttr('disabled');
                    $('#li1_btn').attr('value','保存');
                }
            }
        });
    });
</script>
